package cn.gson.springmvc.model.service;

import cn.gson.springmvc.model.mappers.ZdeptMappers;
import cn.gson.springmvc.model.pojos.Dept;
import com.alibaba.fastjson.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
public class ZdeptService {
    @Autowired
    ZdeptMappers zdeptMappers;

    @Transactional(value ="transactionManager" ,rollbackFor = Exception.class)
    public JSONArray selectDept(){
        return zdeptMappers.selectDept();
    }
}
